﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Theme/main.Master" AutoEventWireup="true" CodeBehind="Items.aspx.cs" Inherits="XPMVC.Items" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Content" runat="server">
    <form runat="server">
        <table cellspacing="5" cellpadding="5" runat="server" visible="true" id="table">
            <tr style="vertical-align: top">
                <td>
                    <div style="border-radius: 15px; overflow: hidden; border: 2px solid #808080; height: 300px; width: 250px">
                        <asp:Image ImageUrl="https://cosy-climbing.net/_files/nikola/image_not_available.jpg" Width="250" Height="300" runat="server" ID="image" />
                    </div>
                </td>
                <td>
                    <div>
                        Name:
                            <div class="catalogue-info">
                                <asp:Label ID="name" runat="server"></asp:Label>
                            </div>
                    </div>
                    <div>
                        Author:
                            <div class="catalogue-info">
                                <asp:Label ID="author" runat="server"></asp:Label>
                            </div>
                    </div>
                    <div>
                        Location:
                            <div class="catalogue-info">
                                <asp:Label ID="location" runat="server"></asp:Label>
                            </div>
                    </div>
                    <div>
                        Description:
                            <div class="catalogue-info">
                                <asp:Label ID="description" runat="server"></asp:Label>
                            </div>
                    </div>
                    <div>
                        Current Bid:
                    <div class="catalogue-info">
                        <asp:Label ID="current_bid" runat="server"></asp:Label>
                    </div>
                        by
                   <div class="catalogue-info">
                       <asp:Label ID="current_bidder" runat="server"></asp:Label>
                   </div>
                    </div>
                    <div style="padding-top: 10px">
                        Bid:
                        <asp:TextBox ID="txtBid" runat="server" CssClass="textbox"></asp:TextBox>
                        <asp:RequiredFieldValidator ControlToValidate="txtBid" ID="reqiredasdasdasd" Display="Dynamic" runat="server" SetFocusOnError="true" ErrorMessage="Required!"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="asduasusdhuad" runat="server" ControlToValidate="txtBid" SetFocusOnError="true" ErrorMessage="Number!" EnableClientScript="true" ValidationExpression="^\d+"></asp:RegularExpressionValidator>
                        <asp:Button ID="btnBid" runat="server" CssClass="button" Text="Bid" OnClick="btnBid_Click" />
                    </div>
                    <div runat="server" id="message" visible="false"></div>
                    <div>
                        <asp:Repeater runat="server" ID="bids">
                            <HeaderTemplate>
                                <table cellpadding="10" style="margin: 0 auto; border-collapse: separate; border-spacing: 5px; width: 100%; color: #fff">
                                    <tr style="background-color: #141111">
                                        <td>User</td>
                                        <td>Bid</td>
                                        <td>Date</td>
                                    </tr>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <tr style="background-color: #1e1e1e">
                                    <td><%#Eval("bider") %></td>
                                    <td><%#Eval("current_bid") %></td>
                                    <td><%#Eval("bid_date") %></td>
                                </tr>
                            </ItemTemplate>
                            <AlternatingItemTemplate>
                                <tr style="background-color: #3b3b3b">
                                    <td><%#Eval("bider") %></td>
                                    <td><%#Eval("current_bid") %></td>
                                    <td><%#Eval("bid_date") %></td>
                                </tr>
                            </AlternatingItemTemplate>
                            <FooterTemplate>
                                </table>
                            </FooterTemplate>
                        </asp:Repeater>
                    </div>
                </td>
            </tr>
        </table>
    </form>
    <div id="error" runat="server" visible="false">Item is either not available for voting or not found</div>
</asp:Content>
